#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>


void *fun(void *arg)
{
	int dat = 0;
	int *p = (int *)arg;

	dat = *p;
	printf("%d\n",dat);


}


int main()
{
	pthread_t tid = 0;
	int ret = 0;
	int data = 0;

	data = 23;

	ret = pthread_create(&tid,NULL,fun,&data);
	if(ret != 0)
	{
		perror("pthread_create");
		exit(-1);
	}

	pthread_join(tid,NULL);

	return 0;
}


